/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package edu.upn.sigemfi.plt.be;

import java.io.Serializable;
import java.util.Date;
import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.NamedQueries;
import javax.persistence.NamedQuery;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 *
 * @author Gerard
 */
@Entity
@Table(name = "PLT_ORDEN_PAGO")
@NamedQueries({@NamedQuery(name = "OrdenPago.findAll", query = "SELECT o FROM OrdenPago o"), @NamedQuery(name = "OrdenPago.findByIdOrdenPago", query = "SELECT o FROM OrdenPago o WHERE o.idOrdenPago = :idOrdenPago"), @NamedQuery(name = "OrdenPago.findByMontoPago", query = "SELECT o FROM OrdenPago o WHERE o.montoPago = :montoPago"), @NamedQuery(name = "OrdenPago.findByFechaRecepcionOrden", query = "SELECT o FROM OrdenPago o WHERE o.fechaRecepcionOrden = :fechaRecepcionOrden"), @NamedQuery(name = "OrdenPago.findByFechaEntregaOrden", query = "SELECT o FROM OrdenPago o WHERE o.fechaEntregaOrden = :fechaEntregaOrden"), @NamedQuery(name = "OrdenPago.findByDescripcion", query = "SELECT o FROM OrdenPago o WHERE o.descripcion = :descripcion")})
public class OrdenPago implements Serializable {
    private static final long serialVersionUID = 1L;
    @Id
    @Basic(optional = false)
    @Column(name = "ID_ORDEN_PAGO", nullable = false)
    @GeneratedValue(strategy=GenerationType.IDENTITY)
    private Long idOrdenPago;
    @Column(name = "MONTO_PAGO", precision = 53)
    private Double montoPago;
    @Column(name = "FECHA_RECEPCION_ORDEN")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaRecepcionOrden;
    @Column(name = "FECHA_ENTREGA_ORDEN")
    @Temporal(TemporalType.TIMESTAMP)
    private Date fechaEntregaOrden;
    @Column(name = "DESCRIPCION")
    @Temporal(TemporalType.TIMESTAMP)
    private Date descripcion;

    public OrdenPago() {
    }

    public OrdenPago(Long idOrdenPago) {
        this.idOrdenPago = idOrdenPago;
    }

    public Long getIdOrdenPago() {
        return idOrdenPago;
    }

    public void setIdOrdenPago(Long idOrdenPago) {
        this.idOrdenPago = idOrdenPago;
    }

    public Double getMontoPago() {
        return montoPago;
    }

    public void setMontoPago(Double montoPago) {
        this.montoPago = montoPago;
    }

    public Date getFechaRecepcionOrden() {
        return fechaRecepcionOrden;
    }

    public void setFechaRecepcionOrden(Date fechaRecepcionOrden) {
        this.fechaRecepcionOrden = fechaRecepcionOrden;
    }

    public Date getFechaEntregaOrden() {
        return fechaEntregaOrden;
    }

    public void setFechaEntregaOrden(Date fechaEntregaOrden) {
        this.fechaEntregaOrden = fechaEntregaOrden;
    }

    public Date getDescripcion() {
        return descripcion;
    }

    public void setDescripcion(Date descripcion) {
        this.descripcion = descripcion;
    }

    @Override
    public int hashCode() {
        int hash = 0;
        hash += (idOrdenPago != null ? idOrdenPago.hashCode() : 0);
        return hash;
    }

    @Override
    public boolean equals(Object object) {
        // TODO: Warning - this method won't work in the case the id fields are not set
        if (!(object instanceof OrdenPago)) {
            return false;
        }
        OrdenPago other = (OrdenPago) object;
        if ((this.idOrdenPago == null && other.idOrdenPago != null) || (this.idOrdenPago != null && !this.idOrdenPago.equals(other.idOrdenPago))) {
            return false;
        }
        return true;
    }

    @Override
    public String toString() {
        return "edu.upn.sigemfi.plt.be.OrdenPago[idOrdenPago=" + idOrdenPago + "]";
    }

}
